package com.shopnight.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shopnight.entity.ShopOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shopnight.redisEntity.CartItem;
import com.shopnight.vo.ResByIdOrder;
import com.shopnight.vo.ResOrder;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
* @author 13201
* @description 针对表【shop_order】的数据库操作Mapper
* @createDate 2022-09-05 18:33:28
* @Entity com.shopnight.entity.ShopOrder
*/
@Repository
public interface ShopOrderMapper extends BaseMapper<ShopOrder> {
    Page<ResOrder>  getOrderByCategoryId(
             @Param("page") Page<ResOrder> page,
             @Param("CategoryId") Integer CategoryId
     );

     Page<ResOrder>  getOrder(
             @Param("orgId") Integer orgId,
             @Param("page") Page<ResOrder> page
     );

     Page<ResOrder>  getOrderByName(
             @Param("orgId") Integer orgId,
             @Param("page") Page<ResOrder> page,
             @Param("orderName") String orderName
     );

    ResByIdOrder  getOrderById(Integer orderId);

    Page<ResOrder> getSeckillOrder(
            @Param("orgId") Integer orgId,
            @Param("page") Page<ResOrder> page
    );

    List<Map<String,Object>>  getSeckillModule(@Param("orgId") Integer orgId);

    List<CartItem> getCartItem(@Param("orderIds") List<Long> orderIds);
}




